package com.wty.swhn.wty.biz.fragment;

import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;//也可以选android.support.app.Fragment
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
//1.===================
public class TabFragment extends Fragment
{
	private String mTitle = "Default";//显示在Fragment内部的textView上

	public static final String TITLE = "title";

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState)
	{
		if (getArguments() != null)
		{
			mTitle = getArguments().getString(TITLE);//负责给mTitle
		}
		//Fragment显示的控件
		TextView tv = new TextView(getActivity());
		tv.setTextSize(60);
		tv.setBackgroundColor(Color.parseColor("#ffffffff"));
		tv.setText(mTitle);
		tv.setGravity(Gravity.CENTER);
		return tv;

	}
}
